home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / untcnvrs.sit / Unit Conversion / card_6161.txt < prev    next >
Text File  |  1990-11-02  |  7KB  |  285 lines

  1. -- card: 6161 from stack: in
  2. -- bmap block id: 6820
  3. -- flags: 0000
  4. -- background id: 3044
  5. -- name: Area2
  6. ----- HyperTalk script -----
  7. on closeCard
  8.   put empty into background field "toconvert"
  9.   put empty into background field "answer"
  10. end closeCard
  11.  
  12.  
  13.  
  14. -- part 14 (button)
  15. -- low flags: 00
  16. -- high flags: A003
  17. -- rect: left=282 top=55 right=82 bottom=474
  18. -- title width / last selected line: 0
  19. -- icon id / first selected line: 0 / 0
  20. -- text alignment: 1
  21. -- font id: 0
  22. -- text size: 12
  23. -- style flags: 0
  24. -- line height: 16
  25. -- part name: Acres  to  Hectares
  26. ----- HyperTalk script -----
  27. on mouseUp
  28.   set numberformat to 0.000
  29.   put empty into background field "answer"
  30.   get first word of background field "toconvert"
  31.   put it into temp
  32.   if temp is "-" then
  33.     get second word of background field "toconvert"
  34.     divide it by -1
  35.     put it into temp
  36.   end if
  37.   put empty into background field "toconvert"
  38.   if temp is empty then
  39.     put temp && "0 Acres" into background field "toconvert"
  40.   else
  41.     put temp && " Acres" into background field "toconvert"
  42.   end if
  43.   multiply temp by 0.405
  44.   put temp && " Hectares" into background field "answer"
  45.   put empty into temp
  46. end mouseUp
  47.  
  48.  
  49.  
  50. -- part 15 (button)
  51. -- low flags: 00
  52. -- high flags: A003
  53. -- rect: left=282 top=87 right=114 bottom=474
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 0 / 0
  56. -- text alignment: 1
  57. -- font id: 0
  58. -- text size: 12
  59. -- style flags: 0
  60. -- line height: 16
  61. -- part name: Hectares to Acres
  62. ----- HyperTalk script -----
  63. on mouseUp
  64.   set numberformat to 0.000
  65.   put empty into background field "answer"
  66.   get first word of background field "toconvert"
  67.   put it into temp
  68.   if temp is "-" then
  69.     get second word of background field "toconvert"
  70.     divide it by -1
  71.     put it into temp
  72.   end if
  73.   put empty into background field "toconvert"
  74.   if temp is empty then
  75.     put temp && "0 Hectares" into background field "toconvert"
  76.   else
  77.     put temp && " Hectares" into background field "toconvert"
  78.   end if
  79.   divide temp by 0.405
  80.   put temp && " Acres" into background field "answer"
  81.   put empty into temp
  82. end mouseUp
  83.  
  84.  
  85.  
  86. -- part 28 (button)
  87. -- low flags: 00
  88. -- high flags: A003
  89. -- rect: left=283 top=122 right=149 bottom=475
  90. -- title width / last selected line: 0
  91. -- icon id / first selected line: 0 / 0
  92. -- text alignment: 1
  93. -- font id: 0
  94. -- text size: 12
  95. -- style flags: 0
  96. -- line height: 16
  97. -- part name: Km  to Miles (Squared)
  98. ----- HyperTalk script -----
  99. on mouseUp
  100.   set numberformat to 0.000
  101.   put empty into background field "answer"
  102.   get first word of background field "toconvert"
  103.   put it into temp
  104.   if temp is "-" then
  105.     get second word of background field "toconvert"
  106.     divide it by -1
  107.     put it into temp
  108.   end if
  109.   put empty into background field "toconvert"
  110.   if temp is empty then
  111.     put temp && "0 Sq. Kilometers" into background field "toconvert"
  112.   else
  113.     put temp && " Sq. Kilometers" into background field "toconvert"
  114.   end if
  115.   multiply temp by 0.386
  116.   put temp && " Sq. Miles" into background field "answer"
  117.   put empty into temp
  118. end mouseUp
  119.  
  120.  
  121.  
  122. -- part 29 (button)
  123. -- low flags: 00
  124. -- high flags: A003
  125. -- rect: left=283 top=152 right=179 bottom=475
  126. -- title width / last selected line: 0
  127. -- icon id / first selected line: 0 / 0
  128. -- text alignment: 1
  129. -- font id: 0
  130. -- text size: 12
  131. -- style flags: 0
  132. -- line height: 16
  133. -- part name: Miles to Km  (Squared)
  134. ----- HyperTalk script -----
  135. on mouseUp
  136.   set numberformat to 0.000
  137.   put empty into background field "answer"
  138.   get first word of background field "toconvert"
  139.   put it into temp
  140.   if temp is "-" then
  141.     get second word of background field "toconvert"
  142.     divide it by -1
  143.     put it into temp
  144.   end if
  145.   put empty into background field "toconvert"
  146.   if temp is empty then
  147.     put temp && "0 Sq. Miles" into background field "toconvert"
  148.   else
  149.     put temp && " Sq. Miles" into background field "toconvert"
  150.   end if
  151.   divide temp by 0.386
  152.   put temp && " Sq. Kilometers" into background field "answer"
  153.   put empty into temp
  154. end mouseUp
  155.  
  156.  
  157.  
  158. -- part 30 (button)
  159. -- low flags: 00
  160. -- high flags: A003
  161. -- rect: left=283 top=274 right=321 bottom=472
  162. -- title width / last selected line: 0
  163. -- icon id / first selected line: 0 / 0
  164. -- text alignment: 1
  165. -- font id: 0
  166. -- text size: 12
  167. -- style flags: 0
  168. -- line height: 16
  169. -- part name: Original Conversions
  170. ----- HyperTalk script -----
  171. on mouseUp
  172.   get background field "toconvert"
  173.   visual effect wipe left slowly
  174.   go to card "Area"
  175.   put it into background field "toconvert"
  176. end mouseUp
  177.  
  178.  
  179.  
  180. -- part 31 (button)
  181. -- low flags: 00
  182. -- high flags: 2000
  183. -- rect: left=283 top=184 right=266 bottom=474
  184. -- title width / last selected line: 0
  185. -- icon id / first selected line: 0 / 0
  186. -- text alignment: 1
  187. -- font id: 0
  188. -- text size: 12
  189. -- style flags: 0
  190. -- line height: 16
  191. -- part name: MoreInfo
  192. ----- HyperTalk script -----
  193. on mouseUp
  194.   get background field "toconvert"
  195.   put it into storevalue
  196.   visual effect zoom open
  197.   go to card "ConversionInfo"
  198. end mouseUp
  199.  
  200.  
  201.  
  202. -- part 32 (button)
  203. -- low flags: 00
  204. -- high flags: 2000
  205. -- rect: left=75 top=288 right=305 bottom=134
  206. -- title width / last selected line: 0
  207. -- icon id / first selected line: 0 / 0
  208. -- text alignment: 1
  209. -- font id: 0
  210. -- text size: 12
  211. -- style flags: 0
  212. -- line height: 16
  213. -- part name: Distance
  214. ----- HyperTalk script -----
  215. on mouseUp
  216.   visual effect zoom open
  217.   go to card Distance
  218. end mouseUp
  219.  
  220.  
  221.  
  222. -- part 33 (button)
  223. -- low flags: 00
  224. -- high flags: 2000
  225. -- rect: left=135 top=288 right=305 bottom=194
  226. -- title width / last selected line: 0
  227. -- icon id / first selected line: 0 / 0
  228. -- text alignment: 1
  229. -- font id: 0
  230. -- text size: 12
  231. -- style flags: 0
  232. -- line height: 16
  233. -- part name: Volume
  234. ----- HyperTalk script -----
  235. on mouseUp
  236.   visual effect zoom open
  237.   go to card Volume
  238. end mouseUp
  239.  
  240.  
  241.  
  242. -- part 34 (button)
  243. -- low flags: 00
  244. -- high flags: 2000
  245. -- rect: left=75 top=306 right=323 bottom=134
  246. -- title width / last selected line: 0
  247. -- icon id / first selected line: 0 / 0
  248. -- text alignment: 1
  249. -- font id: 0
  250. -- text size: 12
  251. -- style flags: 0
  252. -- line height: 16
  253. -- part name: Temperature
  254. ----- HyperTalk script -----
  255. on mouseUp
  256.   visual effect zoom open
  257.   go to card weight
  258. end mouseUp
  259.  
  260.  
  261.  
  262. -- part 35 (button)
  263. -- low flags: 00
  264. -- high flags: 2000
  265. -- rect: left=135 top=306 right=323 bottom=194
  266. -- title width / last selected line: 0
  267. -- icon id / first selected line: 0 / 0
  268. -- text alignment: 1
  269. -- font id: 0
  270. -- text size: 12
  271. -- style flags: 0
  272. -- line height: 16
  273. -- part name: Temperature
  274. ----- HyperTalk script -----
  275. on mouseUp
  276.   visual effect zoom open
  277.   go to card temperature
  278. end mouseUp
  279.  
  280.  
  281.  
  282. -- part contents for background part 7
  283. ----- text -----
  284. Area
  285. Conversions